/*
 * @Author: your name
 * @Date: 2020-08-24 23:20:09
 * @LastEditTime: 2020-09-01 22:37:22
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \data-platform\src\router\index.js
 */
import Vue from 'vue'
import VueRouter from 'vue-router'
// import Home from '../views/Home.vue'
import Login from '../views/Login.vue'
import Permission from '../views/components/permissionPlatform/Permission.vue'
import Index from '../views/components/DataExploration/Index.vue'
/* RPA */
import RPAServer from '../views/components/RPAServer/RPAServer.vue'
import RPAServerHome from '../views/components/RPAServer/index.vue'
import TaskList from '../views/components/RPAServer/TaskList.vue'
import DemoDevelopment from '../views/components/RPAServer/DemoDevelopment.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Login',
    component: Login
  },
  {
    path: '/Home',
    name: 'Home',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/Home.vue')
  },
  {
    path: '/Permission',
    name: 'Permission',
    component: Permission
  },
  {
    path: '/DataExploration',
    name: 'DataExploration',
    component: Index
  },
  {
    path: '/RPAServer',
    name: 'RPAServer',
    redirect: '/RPAServerHome',
    component: RPAServer,
    children: [
      {
        path: '/RPAServerHome',
        name: 'RPAServerHome',
        component: RPAServerHome
      },
      {
        path: '/TaskList',
        name: 'TaskList',
        component: TaskList
      },
      {
        path: '/DemoDevelopment',
        name: 'DemoDevelopment',
        component: DemoDevelopment
      }
    ]
  }
]

const router = new VueRouter({
  routes
})

export default router
